// import Login from '../views/login';
// import Main from '../views/main';
// import Home from '../views/main/home';
// import My from '../views/main/my';
// import Registry from '../views/registry';
// import Create from '../views/create';
// import List from '../views/list';
// import ResetPwd from '../views/resetPwd';

import {lazy} from 'react';

import {RouteItem} from './router.d';

const routes: RouteItem[] = [{
        path: '/login',
        component: lazy(() => import('../views/login')),
        meta:{
            title:'登录'
        }
    },
    {
        path: '/main',
        component: lazy(() => import('../views/main')),
        meta:{
            title:'主页'
        },
        children: [{
                path: '/main/home',
                component: lazy(() => import('../views/main/home')),
                meta:{
                    title:'首页'
                }
            },
            {
                path: '/main/my',
                component: lazy(() => import('../views/main/my')),
                meta:{
                    title:'我的'
                }
            },
            {
                path:'/main',
                redirect:'/main/home'
            }
        ]
    } ,
    {
        path:'/create',
        component:lazy(() => import('../views/create')),
        meta:{
            title:'创建'
        }
    },
    {
        path:'/list',
        component:lazy(() => import('../views/list')),
        meta:{
            title:'列表'
        }
    },
    {
        path:'/registry',
        component:lazy(() => import('../views/registry')),
        meta:{
            title:'注册'
        }
    },
    {
        path:'/resetPwd',
        component:lazy(() => import('../views/resetPwd')),
        meta:{
            title:'忘记密码'
        }
    },
    {
        path: '/',
        redirect: '/main/home'
    }
];

export default routes